<table cellpadding="3" cellspacing="1" class="table table-bordered table-hover" id="list-table">

    <thead>
    <tr>
        <th style="text-align: center">名称</th>
        <th style="text-align: center">描述</th>
        <th style="text-align: center">图片预览</th>
        <th style="text-align: center">展示位置</th>
        <th style="text-align: center">状态</th>
        <th style="text-align: center">操作</th>
    </tr>
    </thead>
<#if (advertisementList?size>0) >
    <#list  advertisementList as advertisement>
    <tbody>
    <tr>
        <!--名称-->
        <td align="center" valign="top" nowrap="nowrap">
            <#if (advertisement.advertisementName)??>
                    ${advertisement.advertisementName}
            </#if>
        </td>
        <!--描述-->
		<td   align="center"  valign="top" >
			<#if (advertisement.advertisementDesc)??>
				 
				 <#if advertisement.advertisementDesc?length lt 30>   
					${advertisement.advertisementDesc}

					<#else> 
					 ${advertisement.advertisementDesc[0..27]}... 
				</#if>
				 
				 
				
			</#if>
		</td>
        
        
        <!--图片预览-->
        <td>
		<#if (advertisement.advertisementPictureUrl)??>
			 
				 
				 	<a href="http://shouer-share.shouerhealth.cn/${advertisement.advertisementPictureUrl}" > <img src="http://shouer-share.shouerhealth.cn/${advertisement.advertisementPictureUrl}" width="60px"></a>
		 </#if>
        </td>

        <!--展示位置-->
        <td align="center" valign="top" nowrap="nowrap">
            <#if (advertisement.positionid)??>
                <#if (advertisement.positionid)==1>
                用户版头部Banner
                <#elseif (advertisement.positionid)==2>
               育儿科普
                <#elseif (advertisement.positionid)==3>
                医生版咨询
   			    <#elseif (advertisement.positionid)==4>
                 小儿食疗
                <#else>
                    未知
                </#if>
            <#else>
                未知
            </#if>
        </td>

        <!--状态-->
        <td align="center" valign="top" nowrap="nowrap">
        <#if (advertisement.isUsedFlag)??>
            <#if (advertisement.isUsedFlag)==1>
            启用
            <#else>
            未启用
            </#if>
        <#else>
            未知
        </#if>
        </td>

        <td  align="center" valign="top" nowrap="nowrap">
            <a href="${basePath}/advertisement/requestModAdvertisement.action?advertisementID=${advertisement.advertisementid}">编辑</a>
            |<a href="javascript: var win=window.open('${basePath}/advertisement/publishAdvertisement.action?advertisementID=${advertisement.advertisementid}','_blank','toolbar=no,scrollbars=yes,top=150,left=400,width=600,height=400')" >发布</a>
            <#if (advertisement.positionid)??>
            <#if (advertisement.positionid)==2>
                |<a href="javascript: var win=window.open('${basePath}/advertisement/pushAdvertisement.action?advertisementID=${advertisement.advertisementid}','_blank','toolbar=no,scrollbars=yes,top=150,left=400,width=600,height=400')" >推送</a>

            </#if>
            </#if>
            |<a href="${basePath}/advertisement/previewAdvertisement.action?advertisementID=${advertisement.advertisementid}" target="_blank">H5预览</a>
            |<a  onclick='dropImpressonItem(this)' >伪删除</a>
        </td>

    </tr>
    </tbody>
    </#list>
</#if>
</table>
<script type="text/javascript">
    listTable.currentPage =${(page.currentPage)?c};
    listTable.pageCount =${(page.totalPage)?c};
    listTable.recordCount =${(page.allRow)?c};
</script>
<!--分页-->
<table id="page-table" cellspacing="0">
    <tr>
        <td align="right" nowrap="true">
            <div id="turn-page">
                共<span id="totalRecords">${page.allRow} </span>条记录&nbsp;
                共<span id="totalPages">${page.totalPage}</span> 页&nbsp;
                当前第<span id="pageCurrent">${page.currentPage}</span>页&nbsp;

                每页显示记录条数 <input type='text' size='3' id='pageSize' value="${page.pageSize}"
                                onkeypress="return listTable.changePageSize(event)"/>
                <!--查询动作-->
                <input type='hidden' size='3' id='action' value="ajaxQueryStuff.action"/>


                <span id="page-link">
                    <a href="javascript:listTable.gotoPageFirst()">第一页</a>
                    <a href="javascript:listTable.gotoPagePrev()">前一页</a>
                    <a href="javascript:listTable.gotoPageNext()">下一页</a>
                    <a href="javascript:listTable.gotoPageLast()">最后一页</a>

                </span>
            </div>
        </td>

    </tr>
</table>